/**
* @Author: Zhengfeng.Yao
* @Date:   2017-01-23 14:12:23
* @Last modified by:   Zhengfeng.Yao
* @Last modified time: 2017-02-09 14:49:55
*/

import React from 'react';
import { Popover } from 'antd';
import './trianglePopover.less';

export default function TrianglePopover(props) {
    const defaultProps = Object.assign({
        placement: 'bottom',
        trigger: 'click',
        overlayClassName: 'aegis-triangle-popover'
    }, props);
    return (
        <Popover
            {...defaultProps}
        >
            <div className="aegis-triangle">
                <div className="aegis-triangle-inner"  onClick={e => e.stopPropagation()}>{props.children}</div>
                <span className="aegis-triangle-icon" />
            </div>
        </Popover>
    );
}
